/*************************************************************************
> File Name: sort_test.c
> Author: icebear
> Mail: 3322366195@qq.com
> Created Time: 2023-07-23 21:52:19
> Description: sort 头文件测试
************************************************************************/

#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include "sort.h"
#define LENGTH 600
int main(int argc, char const *argv[])
{
    srand(time(NULL));
    int arr[LENGTH] = {0};
    for (int i = 0; i < LENGTH; i++)
    {
        arr[i] = rand() % 10000;
    }
    sortArray(arr, LENGTH);
    int flag = 1;
    for (int i = 0; i < LENGTH - 1; i++)
    {
        printf("%d  ", arr[i]);
        if (arr[i + 1] < arr[i])
        {
            flag = 0;
        }
    }
    printf("\n%d\n", flag);
}
